<template>
  <div id="master">
    <func-bar v-on:setIndex="setIndex" :bars="bars"></func-bar>
    <router-view></router-view>
  </div>
</template>

<script>
import FuncBar from "@/components/global/component/Funcbar";
export default {
  data() {
    return {
      index:0,
      bars:[
        {"icon":"mdi-view-day", "color":"purple", "notify": true, "info": "自生成任务"},
        // 自由启用
        // {"icon":"mdi-face-recognition", "color":"green", "notify": true, "info": "计划控制"},
        // {"icon":"mdi-clipboard-list-outline", "color":"blue", "notify": false, "info": "人生25清单"}
      ]
    }
  },
  components:{FuncBar},
  methods:{
    setIndex(index) {
      this.index = index
      switch(index) {
        case 0:
            this.$router.push('/master/zsctask')
          break;
        case 1:
            this.$router.push('/master/plan')
          break;
        case 2:
            this.$router.push('/master/post')
          break;
      }
    }
  }
}
</script>

<style scoped>
#master {
  display:flex;
}
.ma-menu {
  width:140px;
  background:#ddd;
}
.ma-menu>div{
  height:40px;
  line-height:40px;
}
.ma-content{
  flex:1;
}
</style>